package hlhj.fhp.supreme.adapters

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter
import android.view.ViewGroup

/**
 * Created by Administrator on 2018\5\20 0020.
 */
class ViewPagerAdp(var fm: FragmentManager, val datas:List<Fragment>) : FragmentPagerAdapter(fm) {

    override fun getItem(position: Int): Fragment {
        return datas.get(position)
    }

    override fun instantiateItem(container: ViewGroup?, position: Int): Any {

        return super.instantiateItem(container, position)

    }
    override fun getCount(): Int {
        return datas.size
    }

    override fun destroyItem(container: ViewGroup?, position: Int, `object`: Any?) {
//        super.destroyItem(container, position, `object`)
    }

}